package com.chapter14.list_;

import java.util.Iterator;
import java.util.List;
import java.util.Vector;

/**
 * @author 宋鑫宇
 * @version 1.0
 */
public class ListExercise01 {
    @SuppressWarnings("all")
    public static void main(String[] args) {
        List list = new Vector();
        for (int i = 0; i < 14; i++) {
            list.add("abc" + i);
        }
        list.set(1, "SXY");
        System.out.println(list.get(4));
        list.remove(5);
        list.set(6, "asd");
        Iterator iterator = list.iterator();
        while (iterator.hasNext()) {
            Object next = iterator.next();
            System.out.println(next);
        }
    }
}
